package Homeword;

public class Test2 {
  public static void main(String[] args) {
    byte b1=10,b2=20;
    byte b3= (byte) (b1+b2);
    System.out.println("byte类型b1和b2的和为：\n"+b3);

    short s1=1000,s2=2000;
    short s3= (short) (s1+s2);
    System.out.println("short类型s1和s2的和为：\n"+s3);
  }
}
